home *** CD-ROM | disk | FTP | other *** search
- Anders Eriksson wrote:
- <Sounds brilliant. Please start asap! :-) I belive noone else has even
- <made any plans for structure and stuff for the sound, so you might very
- <well do all the layout and design as you think is good.
-
- I allready started, and some definitions are ready... I will speak of them
- later...
-
- Douglas Little wrote:
- <This all makes sense, but you might want to think about priority decay, so
- <that samples which have previously been started reduce in priority as time
- <advances - ensuring that all or most samples are triggered, even if they
- <are never completed. Very important for spot effects which have a decaying
-
- Priority decay is briliant, cant believe I missed that :-)
- Lets say you give a word of priority that decays and reaches zero at the
- same time as the sample is finished!?!
- As for the input, lets have:
- * Sample Nr (Word)
- * X and Y pos (???)
- * Priority (Word)
- * Volume (Byte)
- * Options (Byte)
- * Bit 0-3: Type: 0=Ambient Pitch Random
- 1-4=Ambient Pitch 1-4
- 5=Spot Pitch Random
- 6-9=Spot Pitch 1-4
- * Bit 4: Repeat
- * Bit 5: Priority Decay
- Then you get back a long that is the ID of the sound that later on is used
- if you want to
- move the X and Y, or stop the sample.
-
- Douglas also wrote:
- <Again, no problem with 12.25khz - but remember that we need adjustable
- <frequency playback so we can 'turbulate' monster noises. This way we can
- <avoid deja-vu with repeated grunts & gunfire at the same pitch.
- <
- <Doom gets round this horrible effect by playing each sample at a random
- <frequency based around a fixed pitch of (around) 9khz.
-
- Currently I have four diferent pitches:
- 12.55KHz, 10.98KHz, 9.41KHz and 7.84KHz
- I did not get the "(around) 9khz" thing, but after trying around in some
- trackers I thinks this will not sound to bad. And dont worry about the
- speed, At first I thougth pitch would slow down. But with theese numbers
- it turned out that it takes less time the more I pitch down from 12.5KHz.
-
- More Douglas quote:
- <200k of code - are you considering code generation? Remember this will not
- <cache on the 68030 and 68040 - and tables can suffer in a similar fashion due
-
- Nope not such as much code. The size of the actual code loops depends on
- how to pitch the sample and 16Bits or 8Bits replay and if it is ambient
- sounds. The worst case loop end up at 262Bytes. That is No pitch 16Bit
- 6.25KHz sample, interleaved and spot sound only. Only changing to Non Inter
- leaved will reduse this to 246. Pitches sound decrease even more, not to
- mention silence!! :-)
- But the tables will be quite huge!
- 16Bit, DDAdio (3D sound), will take up more then 250K!!!
- Now I calculate the 3D sound in 256 degrees around the player, halving
- theese steps will halve the size of the table. SubStation uses 16 or 32
- degrees. So 256 seems to be pointless. But I think I will make it as an
- aption of: 32, 64, 128 or 256 degrees. Having 8Bit replay will also halve
- the size. And Only calculating Mono (Distance only) will take the tables
- away nearly completely!
- Therefor I ask if it is possible to allocate memory for theese buffers while
- playing, or will this make troubles with the cashe routines for the
- textures??? I would want to be able to not only alloctae memmory whenever
- I want to. I do also want to change the size of my allocated memory whenever
- I want to.! Is this possible???
-
- Douglas do also says that some kind of envelope of the sound is wanted.
- Personaly I cant se why. Dont you fixx those things when you sample the
- sounds in the first place? I might be wrong but is this realy needed??? It
- wont take any extra processor power, just need some few more tables. But
- still are they needed? Do PC doom use envelopes for the sound fx?
-
- Further more the sound need to be cashed just as the textures. To bad but
- all sounds dont fit in normal memory. So I would want to reuse the cashe
- routines for the textures. Or maybe the same routines could be used? This is
- not urgent right now, but it would be best if I could get look and
- description of that piece of code in time :-) (Dont have a clue about how a
- cashe could be coded in a easy way)
-
- And last but not least: clock cykles! I have a clock cykle table for 030
- in a file called 68030.TXT, this does not make much sence, and dont seem to
- be very correct as I could see... So there for I ask for a new timing
- table. Or someone just could tell me how many cykles the following commands
- take:
- _12KHzA move.b (a0)+,d3
- _6KHzA move.w (a0)+,d3
- and.w d2,d3
- _12KHzAP move.b (a0),d3
- _6KHzAP move.w (a0),d3
- and.w d2,d3
- _16BitDDA move.b (a2,d3.w),d3
- move.l (a4,d3.w*4),d7
- _16BitDA move.w (a2,d3.w*2),d7
- _8BitDDA move.b (a2,d3.w),d3
- move.w (a4,d3.w*2),d7
- _8BitDA move.b (a2,d3.w),d7
- _16BitDDAA move.l (a2,d3.w*4),d7
- _8BitDDAA move.w (a2,d3.w*2),d7
- _8BitDAA move.b (a2,d3.w),d7
- _16BitDDSA move.l d1,d7
- _16BitDSA move.w d1,d7
- _8BitDSA move.b d1,d7
- _16BitDDa add.l d6,d7
- _16BitDa add.w d6,d7
- _8BitDa add.b d6,d7
- _16BitDD move.l d7,(a6)+
- _16BitD move.w d7,(a6)+
- _8BitD move.b d7,(a6)+
- _16BitDDadd add.l d7,(a6)+
- _16BitDadd add.w d7,(a6)+
- _8BitDadd add.b d7,(a6)+
- _16Bit8ChDDIL lea 12(a6),a6
- _16Bit8ChDIL addq.l #6,a6
- _CSound dbra d0,_CSound
- _SoundReady rts
- Hmm, seems like a lot of commands, but some of them are repeated I think.
- Could someone please just check out the timing for cash hits and non-hits
- for al of theese and I will be very happy! And then I would like to know
- how many clock cykles you aproximatly have each VBL. If I am to believe
- the timing table I now have it now take about 2% for the lowest sound
- quality and 20% for the highest. Dont belive in this though!
- The % taken do also depends on how many channels used, and if the sounds are
- ambient or not.
-
- Seting up the quality now have 5 things that changes the CPU needed. They are:
- 16Bit / 8Bit calculation
- 12.25KHz / 6.12KHz calculation
- DDAudio / DAudio
- 8 / 4 Channels
- Non Interleaved / Interleaved
- Left of "/" sound better but takes more power. No combination is illegal so
- 32 different quality setting are possible!!!
-
- Oh, one last thing! May I use FPU commands???
- I need Square root and arc-sine for the DD Audio calculation...
-
- mvh
- PeyloW of T.O.Y.S.
-
-
-